//
//  SettingDetailFeedBackViewModel.m
//  YIJU2.0HD
//
//  Created by URANUS on 16/5/24.
//  Copyright © 2016年 Mr.X. All rights reserved.
//

#import "SettingDetailFeedBackViewModel.h"
#import "SettingDetailFeedBackViewController.h"
#import "SyncTimer.h"

@implementation SettingDetailFeedBackViewModel

- (void)manager:(NetworkingBaseManager *)manager callAPIDidSuccessWithParams:(NSDictionary *)responseParams{
    NSString *detailString = responseParams[@"stateMessage"];
    SettingDetailFeedBackViewController *feedBack = self.viewObject;
    feedBack.configString = detailString;
}

- (void)loadRequest {
    self.manager = [NetworkingManagerFactory generateSHA256Manager];
    RequestGenerator *generator = [RequestGenerator sharedInstance];
    self.manager.apiName = [generator generateCommonApiWithName:[NSString stringWithFormat:@"app/iPad/salers/%ld/feedback",[AppContext sharedInstance].userId]];
    
    self.manager.params = self.postObject;
    self.manager.requestType = HTTP_POST;
    self.manager.successDelegate = self;
    self.manager.validator = self;
    [self.manager loadRequest];
}

@end
